package com.databasir.dao.tables.pojos;

import org.jooq.JSON;
import org.springframework.data.relational.core.sql.In;

import java.io.Serializable;
import java.time.LocalDateTime;

@SuppressWarnings({"all","unchecked","rawTypes"})
public class OperationLog implements Serializable {
    private static final long serialVersionUID=1L;

    private Long          id;
    private Integer       operatorUserId;
    private String        operatorUsername;
    private String        operatorNickname;
    private String        operationModule;
    private String        operationCode;
    private String        operationName;
    private JSON operationResponse;
    private Boolean       isSuccess;
    private Integer       involvedProjectId;
    private Integer       involvedGroupId;
    private Integer       involvedUserId;
    private LocalDateTime createAt;


    public OperationLog() {}

    public OperationLog(OperationLog value) {
        this.id = value.id;
        this.operatorUserId = value.operatorUserId;
        this.operatorUsername = value.operatorUsername;
        this.operatorNickname = value.operatorNickname;
        this.operationModule = value.operationModule;
        this.operationCode = value.operationCode;
        this.operationName = value.operationName;
        this.operationResponse = value.operationResponse;
        this.isSuccess = value.isSuccess;
        this.involvedProjectId = value.involvedProjectId;
        this.involvedGroupId = value.involvedGroupId;
        this.involvedUserId = value.involvedUserId;
        this.createAt = value.createAt;
    }


    public OperationLog(
            Long          id,
            Integer       operatorUserId,
            String        operatorUsername,
            String        operatorNickname,
            String        operationModule,
            String        operationCode,
            String        operationName,
            JSON          operationResponse,
            Boolean       isSuccess,
            Integer       involvedProjectId,
            Integer       involvedGroupId,
            Integer       involvedUserId,
            LocalDateTime createAt
    ) {
        this.id = id;
        this.operatorUserId = operatorUserId;
        this.operatorUsername = operatorUsername;
        this.operatorNickname = operatorNickname;
        this.operationModule = operationModule;
        this.operationCode = operationCode;
        this.operationName = operationName;
        this.operationResponse = operationResponse;
        this.isSuccess = isSuccess;
        this.involvedProjectId = involvedProjectId;
        this.involvedGroupId = involvedGroupId;
        this.involvedUserId = involvedUserId;
        this.createAt = createAt;
    }

    /**
     * Getter for <code>com.databasir.operation_log.id</>
     *
     * */
     public Long getId(){
         return this.id;
     }

     /**
      * Setting for <code>com.databasir.operation_log.id</>
      *
      * */
     public void setId(Long id){
         this.id=id;
     }

    /**
     * Getter for <code>databasir.operation_log.operator_user_id</code>. ref to
     * user.id
     */
    public Integer getOperatorUserId() {
        return this.operatorUserId;
    }

    /**
     *  Setter for <code>databasir.operator_log.operator_user_id</> .ref to
     *  user.id
     * */
    public void setOperatorUserId(Integer operatorUserId){
         this.operatorUserId=operatorUserId;
    }

    /**
     * Getter for <code>databasir.operation_log.operator_username</code>.
     * user.username
     */
    public String getOperatorUsername() {
        return this.operatorUsername;
    }

    /**
     * Setting for <code>databasir.operation_log.operator_username</code>.
     * user.username
     * */
    public void setOperatorUsername(String operatorUsername){
        this.operatorUsername=operatorUsername;
    }

    /**
     * Getter for <code>databasir.operation_log.operator_nickname</code>.
     * user.nickname
     */
    public String getOperatorNickname() {
        return this.operatorNickname;
    }

    /**
     * Setter for <code>databasir.operation_log.operator_nickname</code>.
     * user.nickname
     */
    public void setOperatorNickname(String operatorNickname) {
        this.operatorNickname = operatorNickname;
    }

    /**
     * Getter for <code>databasir.operation_log.operation_module</code>.
     */
    public String getOperationModule() {
        return this.operationModule;
    }

    /**
     * Setter for <code>databasir.operation_log.operation_module</code>.
     */
    public void setOperationModule(String operationModule) {
        this.operationModule = operationModule;
    }

    /**
     * Getter for <code>databasir.operation_log.operation_code</code>.
     */
    public String getOperationCode() {
        return this.operationCode;
    }

    /**
     * Setter for <code>databasir.operation_log.operation_code</code>.
     */
    public void setOperationCode(String operationCode) {
        this.operationCode = operationCode;
    }

    /**
     * Getter for <code>databasir.operation_log.operation_name</code>.
     */
    public String getOperationName() {
        return this.operationName;
    }

    /**
     * Setter for <code>databasir.operation_log.operation_name</code>.
     */
    public void setOperationName(String operationName) {
        this.operationName = operationName;
    }

    /**
     * Getter for <code>databasir.operation_log.operation_response</code>.
     */
    public JSON getOperationResponse() {
        return this.operationResponse;
    }

    /**
     * Setter for <code>databasir.operation_log.operation_response</code>.
     */
    public void setOperationResponse(JSON operationResponse) {
        this.operationResponse = operationResponse;
    }

    /**
     * Getter for <code>databasir.operation_log.is_success</code>.
     */
    public Boolean getIsSuccess() {
        return this.isSuccess;
    }

    /**
     * Setter for <code>databasir.operation_log.is_success</code>.
     */
    public void setIsSuccess(Boolean isSuccess) {
        this.isSuccess = isSuccess;
    }

    /**
     * Getter for <code>databasir.operation_log.involved_project_id</code>. ref
     * to project.id
     */
    public Integer getInvolvedProjectId() {
        return this.involvedProjectId;
    }

    /**
     * Setter for <code>databasir.operation_log.involved_project_id</code>. ref
     * to project.id
     */
    public void setInvolvedProjectId(Integer involvedProjectId) {
        this.involvedProjectId = involvedProjectId;
    }

    /**
     * Getter for <code>databasir.operation_log.involved_group_id</code>. ref to
     * group.id
     */
    public Integer getInvolvedGroupId() {
        return this.involvedGroupId;
    }

    /**
     * Setter for <code>databasir.operation_log.involved_group_id</code>. ref to
     * group.id
     */
    public void setInvolvedGroupId(Integer involvedGroupId) {
        this.involvedGroupId = involvedGroupId;
    }

    /**
     * Getter for <code>databasir.operation_log.involved_user_id</code>. ref to
     * user.id
     */
    public Integer getInvolvedUserId() {
        return this.involvedUserId;
    }

    /**
     * Setter for <code>databasir.operation_log.involved_user_id</code>. ref to
     * user.id
     */
    public void setInvolvedUserId(Integer involvedUserId) {
        this.involvedUserId = involvedUserId;
    }

    /**
     * Getter for <code>databasir.operation_log.create_at</code>.
     */
    public LocalDateTime getCreateAt() {
        return this.createAt;
    }

    /**
     * Setter for <code>databasir.operation_log.create_at</code>.
     */
    public void setCreateAt(LocalDateTime createAt) {
        this.createAt = createAt;
    }

    @Override
    public  String toString(){
         StringBuilder sb = new StringBuilder("OperationLog(");

         sb.append(id)
                 .append(",").append(operatorUserId);
        sb.append(", ").append(operatorUsername);
        sb.append(", ").append(operatorNickname);
        sb.append(", ").append(operationModule);
        sb.append(", ").append(operationCode);
        sb.append(", ").append(operationName);
        sb.append(", ").append(operationResponse);
        sb.append(", ").append(isSuccess);
        sb.append(", ").append(involvedProjectId);
        sb.append(", ").append(involvedGroupId);
        sb.append(", ").append(involvedUserId);
        sb.append(", ").append(createAt);

        sb.append(")");

        return sb.toString();


    }












}
